home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
MEDICAL
/
1752.ZIP
/
MHD.ZIP
/
MHSRCLIN.PRG
< prev
next >
Wrap
Text File
|
1986-07-13
|
3KB
|
96 lines
* MHSRCLINIC DB3 PLUS REVISION 07/13/86
*
* Search for clinical data
*
CLOSE DATABASES
choice2 = 0
repeat = .T.
DELETE FILE MHWORK1.DBF
USE MHWORK
COPY STRUCTURE TO MHWORK1
STORE 'clin_data' TO field
DO WHILE repeat
CLEAR
? 'MENU TO SELECT ANTIMICROBIAL DRUG ACCORDING TO'
? 'CLINICAL CRITERIA OR SPECIAL CHARACTERISTICS'
? ' 1. Free form selection 8. Sexually transmitted disease'
? ' 2. UTI 9. Acute PID and salpingitis'
? ' 3. Prophylaxis 10.'
? ' 4. Teratogenic 11 '
? ' 5. Synergism 12.'
? ' 6. Resistance 13.'
? ' 7. Combination therapy 14.'
ACCEPT 'Enter the number of your choice: ' TO choice
STORE VAL(choice) TO choice2
* Limit choice to numbers between 1 and 9
IF choice2 >= 1 .AND. choice2 <= 9
STORE .F. TO repeat
ENDIF choice2 >= 1 AND <= 9
ENDDO WHILE repeat
DO CASE
CASE choice2 = 1
? 'You may enter a search string using dBASE II conventions,'
? 'with each term enclosed in single quotes followed by $clin_data'
ACCEPT 'Enter string: ' TO search
CASE choice2 = 2
STORE 'UTI' TO search
CASE choice2 = 3
STORE 'prophylaxis' TO search
CASE choice2 = 4
STORE 'teratogenic' TO search
CASE choice2 = 5
STORE 'synergi' TO search
CASE choice2 = 6
STORE 'resist' TO search
CASE choice2 = 7
STORE 'combination' TO search
CASE choice2 = 8
STORE 'STD' TO search
CASE choice2 = 9
STORE 'PID' TO search
ENDCASE
? 'Searching database for antimicrobials for: '
IF search2
? combsrch + ' and ' + search
ENDIF search2
IF .NOT. search2
? search
ENDIF NOT search2
* Select data in MHCLINIC.DBF or MHCOMBIN.DBF and store in MHWORK1
SELECT B
USE MHWORK1
SELECT A
USE &datafile
* Match free form search string with data in field
IF STR(choice2,1) = '1'
DO WHILE .NOT. EOF()
IF &search
STORE DRUG_ID TO mdrug_id
* Store matching drug:id in temporary WORK1
SELECT MHWORK1
APPEND BLANK
REPLACE DRUG_ID WITH mdrug_id
SELECT &datafile
ENDIF &search
SKIP
ENDDO WHILE NOT EOF
ENDIF STR(choice2,1) = '1'
* Match menu-chosen search string with data in field
IF STR(choice2,1) <> '1'
DO WHILE .NOT. EOF()
IF '&search' $&field
STORE DRUG_ID TO mdrug_id
* Store matching drug:id in temporary WORK1
SELECT MHWORK1
APPEND BLANK
REPLACE DRUG_ID WITH mdrug_id
SELECT &datafile
ENDIF '&search' $&field
SKIP
ENDDO WHILE NOT EOF
ENDIF STR(choice2,1) <> '1'
choice = '2'
repeat = .T.
RETURN